/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package dk.rofl.units;

/**
 *
 * @author menderleit
 */
public class DamageReport {
    
    private int baseDamage;
    private int weaponDamage;
    private int damageDone;
    private boolean criticalStrike;
    private boolean parried;
    private boolean riposte;
    
    // Constructor
    public DamageReport(int baseDamage, int weaponDamage, int damageDone, boolean wasCriticalStrike, boolean wasParry, boolean riposte) {
        this.baseDamage = baseDamage;
        this.weaponDamage = weaponDamage;
        this.damageDone = damageDone;
        this.criticalStrike = wasCriticalStrike;
        this.parried = wasParry;
        this.riposte = riposte;
    }
    
    // Get the base damage dealt.
    public int getBaseDamage() {
        return baseDamage;
    }
    
    // Get the weapon damage dealt.
    public int getWeaponDamage() {
        return weaponDamage;
    }
    
    // Get the base and weapon damage combined.
    public int getAttackDamage() {
        return (baseDamage + weaponDamage);
    }
    
    // Get the final damage including critical strike bonus.
    public int getFinalDamage() {
        int finalDamage = getAttackDamage();
        if(criticalStrike) {
            finalDamage = finalDamage * 2;
        }
        return finalDamage;
    }
    
    // Get the damage actually taken by the enemy.
    public int getDamageDone() {
        return damageDone;
    }
    
    // Get the damage absorbed by the enemy's armor.
    public int getAbsorbedDamage() {
        return (getAttackDamage() - damageDone);
    }
    
    // Was this a critical strike?
    public boolean wasCriticalStrike() {
        return criticalStrike;
    }
    
    public boolean wasParried() {
        return parried;
    }
    
    public boolean getRiposte() {
        return riposte;
    }
}
